# Project Type
TEMPLATE = app

# Qt modules that are used by your project
QT += qml quick gui widgets multimedia opengl openglextensions

# Project configuration and compiler options
CONFIG += qt warn_on c++11 rtti stl thread exceptions

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Refer to the documentation for the
# deprecated API to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

HEADERS += \
    AudioPlay.h \
    IVideoCall.h \
    MYAudioThread.h \
    MYDecode.h \
    MYDecodeThread.h \
    MYDemux.h \
    MYDemuxThread.h \
    MYPlayer.h \
    MYResample.h \
    MYSubtitle.h \
    MYVideoOutput.h \
    MYVideoThread.h \
    MainApp.h

SOURCES += \
        AudioPlay.cpp \
        MYAudioThread.cpp \
        MYDecode.cpp \
        MYDecodeThread.cpp \
        MYDemux.cpp \
        MYDemuxThread.cpp \
        MYPlayer.cpp \
        MYResample.cpp \
        MYSubtitle.cpp \
        MYVideoOutput.cpp \
        MYVideoThread.cpp \
        MainApp.cpp \
        main.cpp

RESOURCES += \
    resource/ui/resource.qrc

# Directory where all intermediate objects and moc files should be placed
CONFIG(debug, debug|release) {
    OBJECTS_DIR = ./tmp/debug
    MOC_DIR = ./tmp/debug
} else {
    OBJECTS_DIR = ./tmp/release
    MOC_DIR = ./tmp/release
}

# Directory where all intermediate files from uic should be placed
CONFIG(debug, debug|release) {
    UI_DIR = ./tmp/debug
} else {
    UI_DIR = ./tmp/release
}

# Directory for Qt Resource Compiler output files
CONFIG(debug, debug|release) {
    RCC_DIR = ./tmp/debug
} else {
    RCC_DIR = ./tmp/release
}

# Specifies where to put the target file
CONFIG(debug, debug|release) {
    contains(QMAKE_TARGET.arch, x86_64) {
        DESTDIR = ./bin/debug/x64
    } else {
        DESTDIR = ./bin/debug/x86
    }
} else {
    contains(QMAKE_TARGET.arch, x86_64) {
        DESTDIR = ./bin/release/x64
    } else {
        DESTDIR = ./bin/release/x86
    }
}

# Name of the target file
TARGET = JLPlayer

# Codec configuration
CODECFORTR = UTF-8
CODECFORSRC = UTF-8

# Translation file path
TRANSLATIONS += ./MYPlayer_zh_CN.ts

# Include path
INCLUDEPATH += ./include

# Libaray path and libaray
CONFIG(debug, debug|release) {
    contains(QMAKE_TARGET.arch, x86_64) {
        LIBS += -L"$$PWD/lib/debug/x64/"
    } else {
        LIBS += -L"$$PWD/lib/debug/x86/"
    }
#    win32:LIBS += libqrencode.lib\
#                  libzint.lib
#    unix:LIBS += -lqrencode\
#                 -lzint
} else {
    contains(QMAKE_TARGET.arch, x86_64) {
        LIBS += -L"$$PWD/lib/release/x64/"
    } else {
        LIBS += -L"$$PWD/lib/release/x86/"
    }
#    win32:LIBS += libqrencode.lib\
#                  libzint.lib
#    unix:LIBS += -lqrencode\
#                 -lzint
}
win32:LIBS += avformat.lib\
              avcodec.lib\
              avutil.lib\
              swresample.lib\
              swscale.lib

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

